package com.ssy.lingxi.product.entity.material;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 基础物料流程（系统初始化配置）
 * @author 彭冬冬
 * @version 2.0.0
 * @date 2022/3/25 17:00
 */
@Entity
@Table(schema = "public",
        name = "product_base_material_process",
        indexes = {
        @Index(name = "product_base_material_process_process_type_idx", columnList = "processType"),
        @Index(name = "product_base_material_process_status_idx", columnList = "status"),
        }
)
public class BaseMaterialProcessDO implements Serializable {
    private static final long serialVersionUID = -502686475585182378L;

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "product_base_material_process_seq")
    @SequenceGenerator(sequenceName = "product_base_material_process_seq", name ="product_base_material_process_seq", allocationSize = 1)
    private Long id;

    /**
     * 流程枚举值，
     * 定义在：MaterialProcessEnum
     */
    @Column
    private Integer code;

    /**
     * 流程对应的工作流的key
     */
    @Column(columnDefinition = "varchar(200)")
    private String processKey;

    /**
     * 流程名称
     */
    @Column(columnDefinition = "varchar(100)")
    private String name;

    /**
     * 流程类型
     * 定义在 MaterialProcessTypeEnum
     */
    @Column
    private Integer processType;

    /**
     * 状态
     * 定义在 MaterialProcessStatusEnum
     */
    @Column
    private Integer status;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getProcessKey() {
        return processKey;
    }

    public void setProcessKey(String processKey) {
        this.processKey = processKey;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getProcessType() {
        return processType;
    }

    public void setProcessType(Integer processType) {
        this.processType = processType;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
